import request from "@/request/index.js";

// 获取档案基本信息
export function getPatientBaseInfo(params) {
  return request.get({
    url: "/app-api/health/patient/health-record/basic/get",
    params: params || {},
    custom: {
      title: "获取档案基本信息",
      authentication: true,
    },
  });
}

// 新建档案信息/身高体重信息
export function addArchive(params) {
  return request.post({
    url: "/app-api/health/patient/health-record/basic/create",
    data: params || {},
    custom: {
      title: "记录档案信息",
      authentication: true,
    },
  });
}

// 获取档案明细记录 patientId
export function getDetailList(params) {
  return request.get({
    url: "/app-api/health/patient/health-record/basic/record/page",
    params: params || {},
    custom: {
      title: "获取档案明细记录",
      authentication: true,
    },
  });
}

// 查询就医资料列表
export function getMedicalRecordList(params) {
  return request.get({
    url: "/app-api/health/patient/health-record/medical/statistic",
    params: params || {},
    custom: {
      title: "查询就医资料列表",
      authentication: true,
    },
  });
}

// ai解析病例 patientId + fileUrls
export function aiParse(params) {
  return request.post({
    url: "/app-api/health/patient/health-record/medical/ai-parse",
    data: params || {},
    custom: {
      title: "ai解析病例",
      authentication: true,
    },
  });
}

// 查询门诊病历列表 patientId+recordType
export function getOutpatientRecordList(params) {
  return request.get({
    url: "/app-api/health/patient/health-record/medical/list",
    params: params || {},
    custom: {
      title: "查询门诊病历列表",
      authentication: true,
    },
  });
}

// 查询门诊病历详情 id
export function getOutpatientRecordDetail(params) {
  return request.get({
    url: "/app-api/health/patient/health-record/medical/get",
    params: params || {},
    custom: {
      title: "查询门诊病历详情",
      authentication: true,
    },
  });
}